package tictactoe.protocol;

import junit.framework.Assert;
import junit.framework.TestCase;
import org.junit.Before;

/**
 * Created by IntelliJ IDEA.
 * User: Double
 * Date: 16.01.12
 * Time: 2:59
 * To change this template use File | Settings | File Templates.
 */
public class PacketTest extends TestCase
{
	Packet p;
	@Before
	public void setUp() throws Exception
	{
		p = new Packet("type","data");

	}

	@org.junit.Test
	public void testGetType() throws Exception
	{
		Assert.assertEquals("type",p.getType());

	}

	@org.junit.Test
	public void testSetType() throws Exception
	{
		p.setType("test");
		Assert.assertEquals("test",p.getType());

	}

	@org.junit.Test
	public void testGetData() throws Exception
	{
		Assert.assertEquals("data",p.getData());

	}

	@org.junit.Test
	public void testSetData() throws Exception
	{
		p.setData("test");
		Assert.assertEquals("test",p.getData());

	}
}
